package com.example.replacebooks.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import lombok.Data;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * <p>
 * 置换的书籍信息表
 * </p>
 *
 * @author replacebooks
 * @since 2024-12-15
 */
@Data
@Table(name = "changebook")
public class Changebook extends Model<Changebook> {

    /**
     * 置换的书籍信息id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer changebookid;

    /**
     * 书籍id
     */
    private Integer bookid;

    /**
     * 用户id
     */
    private Integer userid;

    /**
     * 置换书籍图片
     */
    private String changeimg;

    /**
     * 置换的书籍名
     */
    private String changename;

    /**
     * 置换的书籍新旧程度
     */
    private String changedegree;


    /**
     * 置换状态(审核中,已通过(此时相互填写地址),已完成
     */
    private String changestatu;

    /**
     * 通过审核时间
     */
    private String time;

    /**
     * 完成置换的世界
     */
    private String changetime;

    /**
     * 置换者的地址
     */
    private String changeaddress;

    /**
     * 发布者的地址
     */
    private String address;

    /**
     * 置换的书籍ISBN
     */
    @TableField("changeISBN")
    private String changeisbn;

    @TableField(exist = false)
    private String bookimg;
    @TableField(exist = false)
    private String bookname;
    @TableField(exist = false)
    private String bookintro;
    @TableField(exist = false)
    private String bookuserid;
    @TableField(exist = false)
    private String name;

    @Override
    protected Serializable pkVal() {
        return null;
    }

}
